<script>
    function accessMenu(link){
        $("#loadingAccess").show();
        $("#accessPage").load("<?= base_url(); ?>index.php?/admin_settings/"+link);
    }
</script>
<div id="accessPage">
    <div class="post">
        <?php foreach ($access_menus as $link => $label) {
        ?>
            <p class="" style="display: inline;text-decoration: underline;padding-right: 5px"><a href="javascript:accessMenu('<?= $link ?>');"><?= $label ?></a></h2>
        <?php } ?>
            <h2 class="title"><?= $title;?></h2>
        <div class="entry">

            <input type="button" value="Add new" onclick="show('#new_admin')"/>
            <img src="<?= base_url(); ?>images/loading.gif" alt="Loading.." style="display: none;" id="loadingAccess"/>
            <div id="admin_result" style="display: none" >
            </div>
            <!--a href="" id="hide3" >Hide</a> <a href="" id="show3" >Show</a-->
            <div id="new_admin" style="display: none;margin-bottom: 10px;">
                <?php $data['id'] = "asset_form" ?>
                <?= form_open_multipart('admin_settings/saveAdmin', $data); ?>
                <table>
                    <tr class="darker"><td class="half">Username</td><td><input type="text" class="wide" name="username" value="<?php echo set_value('asset_name'); ?>"  /></td> </tr>
                    <tr  class="darker"><td>Password</td><td><input type="password"  class="wide" name="password"/></td> </tr>
                    <tr  class="darker"><td>Repeat Password</td><td><input type="password"  class="wide" name="password2"/></td> </tr>
                    <tr class="lighter"><td>Names</td><td><input type="text" class="wide"  name="names" value="<?php echo set_value('date_purchased'); ?>" id="asset_datepicker" /></td> </tr>
                    <tr  class="darker"><td>Position </td><td><input type="text"  class="wide" name="position" value="<?php echo set_value('quantity'); ?>" /></td> </tr>
                    <tr><td colspan="2" style="text-align: right">
                            <input type="submit" value="Submit" />
                            <input type="button" value="Cancel" onclick="hide('#new_admin')"/>
                        </td></tr>
                </table>
                </form>
            </div>
            <div id="all_asset">
                <?= $tablet ?>
                <?= $pagina ?>
            </div>

        </div>
    </div>
</div>